<template>
    <div>
        <ui-title class="mt50">测评排行</ui-title>
        <div class="bg-light-white p20">
            <div v-for="item in list" :key="item.id" class="flex mb15">
                <div class="mr10">
                    <ui-img :url="item.logo" size="60px" style="border:3px solid #eee;"></ui-img>
                </div>
                <div>
                    <p class="f16">{{item.name}}</p>
                    <div>
                        <span class="mr20"><i class="f-color-orange">{{parseInt(item.score)}}</i> 分</span>
                        <span v-if="item.rate>=0" class="f-color-blue">高于同行 {{(item.rate*100).toFixed(2)}}%</span>
                        <span v-else class="f-color-text">低于同行 {{item.rate*100}}%</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data(){
            return {
                list:[]
            }
        },
        created(){
            // 评测排行
            this.$http.get('index.php?g=home&m=companyTesting&a=company_Ranking', {
                params:{
                    pageSize:5
                }
            })
            .then(({data})=>{
                console.log('评测排行',data)
                if (data.code===1) {
                    this.list = data.data
                }
            })
        },
    }
</script>